﻿<src:WpfConfiguration x:Class="SensorMayhem.Wpf.LocationConfig"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:src="clr-namespace:MayhemWpf.UserControls;assembly=MayhemWpf"
             xmlns:map="clr-namespace:Microsoft.Maps.MapControl.WPF;assembly=Microsoft.Maps.MapControl.WPF"
             Width="400">

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150" />
            <ColumnDefinition Width="200" />
            <ColumnDefinition Width="50" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition Height="400" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <TextBlock Style="{StaticResource ConfigLabel}" Text="Selected location:" Grid.Row="0"/>
        <TextBlock x:Name="selectedLocationTextBlock" Grid.Row="0" Grid.ColumnSpan="2" Grid.Column="1"/>
        
        <TextBlock Style="{StaticResource ConfigLabel}" Text="Radius of detection (KM):" Grid.Row="1"/>
        <Slider x:Name="RadiusSlider" Minimum="0.1" Maximum="50" TickFrequency="0.1" Grid.Row="1" Grid.Column="1"/>
        <TextBlock TextAlignment="Center" x:Name="radiusTextBlock" Grid.Row="1" Grid.Column="2" Text="{Binding ElementName=RadiusSlider, Path=Value, StringFormat=\{0:F\}}" />

        <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="2" HorizontalAlignment="Center">
            <StackPanel>
                <RadioButton x:Name="insideRadioButton" GroupName="RadioGroup" Content="Is Inside"/>
                <RadioButton x:Name="outsideRadioButton" GroupName="RadioGroup" Content="Is Outside"/>
            </StackPanel>
        </Grid>

        <map:Map x:Name="myMap" Grid.Row="3" ZoomLevel="5" Grid.ColumnSpan="3" CredentialsProvider="AnA-sZrZKri1ws-4-QIYLgrsEc-c_iCejlMFvDcblXpKcz7sTpGW0sjL-3TwAs2C" Mode="Road"  Margin="0,0,0,0" MouseRightButtonDown="myMap_MouseRightButtonDown" >
        </map:Map>

        <TextBlock TextAlignment="Center" Text="Right click or Tap&amp;Hold to select a location." Grid.ColumnSpan="3" Grid.Row="4"/>
        
    </Grid>
</src:WpfConfiguration>